//
//  UIView+Tap.h
//  Express
//
//  Created by lhongl on 2025/9/26.
//  Copyright © 2025 QM. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface UIView (Tap)

/// 事件
/// - Parameter tapAction: 事件
/// 注意:【循环引用注意】
- (void)addTapBlock:(void(^)(id obj))tapAction;

/// 添加点击事件
/// - Parameters:
///   - target: target
///   - action: 事件
- (void)addTarget:(id)target action:(SEL)action;


/// 事件
/// - Parameters:
///   - numberOfTaps: 点击次数
///   - tapAction: 事件【注意循环引用】;
- (void)addTapWithTapsRequired:(NSInteger)numberOfTaps block:(void(^)(id obj))tapAction;

/// 添加点击事件
/// - Parameters:
///   - target: target
///   - numberOfTaps 点击次数
///   - action: 事件
- (void)addTarget:(id)target tapsRequired:(NSInteger)numberOfTaps action:(SEL)action;


/// 事件
/// - Parameters:
///   - numberOfTaps: 点击次数
///   - numberOfTouches: 手指数
///   - tapAction: 事件【注意循环引用】
- (void)addTapWithTapsRequired:(NSInteger)numberOfTaps touchesRequired:(NSInteger)numberOfTouches block:(void(^)(id obj))tapAction;

/// 事件
/// - Parameters:
///   - target: target
///   - numberOfTaps: 点击次数
///   - numberOfTouches: 手指数
///   - action: 事件
- (void)addTarget:(id)target tapsRequired:(NSInteger)numberOfTaps touchesRequired:(NSInteger)numberOfTouches action:(SEL)action;

@end

NS_ASSUME_NONNULL_END
